package com.sixth.core.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 
 * @TableName his_registration
 */
@TableName(value ="his_registration")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Registration implements Serializable {
    /**
     * 挂号流水
     */
    @TableId(type = IdType.AUTO)
    private String registrationId;

    /**
     * 患者ID
     */
    private String patientId;

    /**
     * 患者姓名
     */
    private String patientName;

    /**
     * 接诊医生ID
     */
    private Long userId;

    /**
     * 接诊医生姓名
     */
    private String doctorName;

    /**
     * 科室ID
     */
    private Integer deptId;

    /**
     * 挂号费用ID
     */
    private Integer registrationItemId;

    /**
     * 挂号总金额
     */
    private BigDecimal registrationAmount;

    /**
     * 挂号编号
     */
    private Integer registrationNumber;

    /**
     * 挂号状态0未收费,1待就诊，2,就诊中，3，就诊完成，4，已退号，5 作废
     */
    private String registrationStatus;

    /**
     * 就诊日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private String visitDate;

    /**
     * 排班类型1 门诊 2 急诊 字典表数据翻译
     */
    private String schedulingType;

    /**
     * 排班时段1上午  2下午 3晚上 字典表数据翻译
     */
    private String subsectionType;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date updateTime;

    /**
     * 创建人
     */
    private String createBy;
    /**
     * 不存在字段记录总接诊次数
     */
    @TableField(exist = false)
    private Integer totalVisits;

    @TableField(exist = false)
    private User user;
    @TableField(exist = false)
    private Dept dept;
    @TableField(exist = false)
    private CareHistory careHistory;
    @TableField(exist = false)
    private List<CareOrder> careOrders;
    @TableField(exist = false)

    private List<OrderChargeItem> orderChargeItems;
    @TableField(exist = false)

    private Patient patient;
    @TableField(exist = false)
    private List<CareOrderItem> careOrderItems;
    @TableField(exist = false)
    private Integer itemAmount;
    @TableField(exist = false)
    private Integer backAmount;
    @TableField(exist = false)
    private Integer weixinAmount;
    @TableField(exist = false)
    private Integer weixin;
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;


}